package com.mcm.dao;

import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.MongoClient;

public class MongoConnection 
{
	public static DB getMcmDB()
	{
		try
		{
			MongoClient mongoClient = new MongoClient();
			DB db = mongoClient.getDB("mcm");

			return db;
		} catch(Exception e)
		{
			// TODO: handle exception
		}
		return null;
	}
	
	public static DBCollection getProductosCollection()
	{
		DB db = getMcmDB();
		return db.getCollection("productos");
	}
	
	public static DBCollection getVentasCollection()
	{
		DB db = getMcmDB();
		return db.getCollection("ventas");
	}
	
	public static DBCollection getNroVentaCollection()
	{
		DB db = getMcmDB();
		return db.getCollection("nroVenta");
	}
}
